vcScope
Scope is a collection of statements in a program.
See in: Overview
Module: vcExecutor
Parent: vcObject
Children: vcRoutine, vcElseIfScope
Referenced by: vcIfStatement.ElseScope, vcIfStatement.ThenScope, vcProcessIfStatement.ElseScope, vcProcessIfStatement.ThenScope, ... (see more)
vcIfStatement.ElseScope
vcIfStatement.ThenScope
vcProcessIfStatement.ElseScope
vcProcessIfStatement.ThenScope
vcProcessWhileStatement.Scope
vcScopeStatement.Scope
vcStatement.ParentScope
vcStatement.Scopes
vcStatementHelper.GetActiveScope()
Properties
Learn how to use properties here. The properties are also inherited from the parent class.
| Name | Type | Access | Description |
| ParentStatement | vcStatement | R | Gets the statement that owns the scope, for example a conditional If or While statement that has a nested block of statements; otherwise the value is None for routines. |
| Statements | vcObservableList[vcStatement] | R | Gets a list of statements belonging to the scope. |
Methods
Learn how to use methods here. The methods are also inherited from the parent class.
| Name | Return Type | Parameters | Description |
| clear | None | None | Deletes all statements in the scope. |
| createStatement | vcStatement | vcStatementType statementType, Optional Keyword[index = Integer] | Creates a new statement of a given type in the scope.See moreParameters: statementType (vcStatementType): Type for the statement to be created. Optional: index (Integer): Index for the new statement. The default index value is -1 which adds the new statement to the end of the scope. Exceptions: ValueError: When creating a break or continue statement type outside of a loop. ValueError: When statement is non-requirement statement and added to requirement statement scope. ValueError: When statement is requirement statement and added to non-requirement statement scope. ValueError: When creating a non-process statement in a process executor. ValueError: When creating a process statement in a robot executor. Returns: vcStatement: Created statement. |
| moveStatement | None | vcStatement statement, Integer newIndex | Moves statement to different index in list. |
Events
Learn how to use events here. The events are also inherited from the parent class.
| Name | Parameters | Description |
| OnScopeExecuted | bool isImmediate | Triggered when a scope is executed.See moreParameters: isImmediate (bool): Defines whether the scope was executed in immediate mode (non time-consuming mode) or not. |